package com.by.controller;

import cn.hutool.core.bean.BeanUtil;
import com.by.common.bean.PageBean;
import com.by.common.bean.ResultBean;
import com.by.common.controller.BaseController;
import com.by.query.FreightInquiryQuery;
import com.by.service.FreightQuoteService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.io.Serializable;

@Api(tags = "货代报价")
@RequestMapping("/api")
@RestController
public class FreightQuoteController extends BaseController {
    @Autowired
    FreightQuoteService freightQuoteService;
    @ApiOperation("货代报价列表")
    @PostMapping("/freightQuote/list")
    public ResultBean query(@RequestBody FreightInquiryQuery query){
        PageBean bean=freightQuoteService.queryByMap(BeanUtil.beanToMap(query));
        return success("货代报价列表",bean);
    }
}
